package com.ruoyi.system.domain.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * 宠物识别结果
 */
public class PetRecognitionResult {
    /** 识别结果代码 */
    private Integer code;
    
    /** 识别结果消息 */
    private String msg;
    
    /** 识别结果 */
    private Result result;

    public static class Result {
        private List<PetInfo> list;

        public List<PetInfo> getList() {
            return list;
        }

        public void setList(List<PetInfo> list) {
            this.list = list;
        }
    }

    public static class PetInfo {
        /** 可信度 */
        private Integer trust;
        
        /** 宠物类型ID */
        private Integer pettype;
        
        /** 宠物名称 */
        private String name;
        
        /** 英文名称 */
        private String engName;
        
        /** 特征 */
        private String characters;
        
        /** 原产地/国家 */
        private String nation;
        
        /** 易患疾病 */
        private String easyOfDisease;
        
        /** 寿命 */
        private String life;
        
        /** 价格 */
        private String price;
        
        /** 描述 */
        private String desc;
        
        /** 特点 */
        private String feature;
        
        /** 性格特征 */
        private String characterFeature;
        
        /** 养护知识 */
        private String careKnowledge;
        
        /** 喂养要点 */
        private String feedPoints;
        
        /** 详情链接 */
        private String url;
        
        /** 封面图片 */
        private String coverURL;

        // Getters and Setters
        public Integer getTrust() {
            return trust;
        }

        public void setTrust(Integer trust) {
            this.trust = trust;
        }

        public Integer getPettype() {
            return pettype;
        }

        public void setPettype(Integer pettype) {
            this.pettype = pettype;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getEngName() {
            return engName;
        }

        public void setEngName(String engName) {
            this.engName = engName;
        }

        public String getCharacters() {
            return characters;
        }

        public void setCharacters(String characters) {
            this.characters = characters;
        }

        public String getNation() {
            return nation;
        }

        public void setNation(String nation) {
            this.nation = nation;
        }

        public String getEasyOfDisease() {
            return easyOfDisease;
        }

        public void setEasyOfDisease(String easyOfDisease) {
            this.easyOfDisease = easyOfDisease;
        }

        public String getLife() {
            return life;
        }

        public void setLife(String life) {
            this.life = life;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getFeature() {
            return feature;
        }

        public void setFeature(String feature) {
            this.feature = feature;
        }

        public String getCharacterFeature() {
            return characterFeature;
        }

        public void setCharacterFeature(String characterFeature) {
            this.characterFeature = characterFeature;
        }

        public String getCareKnowledge() {
            return careKnowledge;
        }

        public void setCareKnowledge(String careKnowledge) {
            this.careKnowledge = careKnowledge;
        }

        public String getFeedPoints() {
            return feedPoints;
        }

        public void setFeedPoints(String feedPoints) {
            this.feedPoints = feedPoints;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getCoverURL() {
            return coverURL;
        }

        public void setCoverURL(String coverURL) {
            this.coverURL = coverURL;
        }
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    public PetRecognitionResult() {
        this.code = 200;
        this.msg = "操作成功";
        this.result = new Result();
    }

    public static PetRecognitionResult success(List<PetInfo> resultList) {
        PetRecognitionResult response = new PetRecognitionResult();
        response.getResult().setList(resultList);
        return response;
    }

    public static PetRecognitionResult error(String errorMsg) {
        PetRecognitionResult response = new PetRecognitionResult();
        response.getResult().setList(null);
        response.setCode(500);
        response.setMsg(errorMsg);
        return response;
    }
}
